import * as jwt from 'jsonwebtoken';
import { Injectable } from '@nestjs/common';

@Injectable()
export class AuthService {
    constructor() { }
    public async createToken(userName) {
        const token = await jwt.sign({
            exp: Math.floor(Date.now() / 1000) + (60 * 60),
            name: userName
        }, 'secret');
        return token;
    }
    effect() {
        console.log('effct');
    }
}